var express = require('express');
var path = require('path');
var cookieParser = require('cookie-parser');
var logger = require('morgan');

var app = express();

app.use(logger('dev'));
app.use(express.json());
app.use(express.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));

app.use(require("./cors"));



// app.use("/api/upload", require("./routes/upload"));

app.use('/api/Users', require("./routes/Users")); //  用户 作者：曾浩南
app.use('/api/Comment', require("./routes/Comment")); //  评论 作者：简邦松

app.use("/api/Shop", require("./routes/Shop"));//门店 作者：敬林文
app.use("/api/Goods", require("./routes/Goods"));//商品 作者：黄萌
app.use("/api/Service", require("./routes/Service"));//服务 作者：黄萌
app.use("/api/ShopSell", require("./routes/ShopSell"));//门店销售 作者：黄萌


app.use("/api/Supplier", require("./routes/Supplier")); //供货商路由  作者：舒利霞
app.use("/api/SupplierGoods", require("./routes/SupplierGoods")); //供货商商品路由  作者：舒利霞

app.use("/api/Host", require("./routes/Host"));//宠主路由  作者：赵霖
app.use("/api/GoodsOrder", require("./routes/GoodsOrder"));//商品订单路由 作者：吴佩雄
app.use("/api/ServiceOrder", require("./routes/ServiceOrder"));//服务订单路由 作者：吴佩雄

app.use("/api/ServiceOrder", require("./routes/ServiceOrder"));//用户路由 作者：吴佩雄
app.use("/api/ServiceOrder", require("./routes/ServiceOrder"));//评价路由  作者：吴佩雄
module.exports = app;
